package simulation;

public class Util
{
	public static float cLattitudeCircum(double d, double earthRadius)
	{
		double latRadius = earthRadius * Math.sin(Math.toRadians(90-d));
		return (float)((2.0 * latRadius) * Math.PI);
	}
	
	public static float cTrapezoidArea(double t, double b, double h)
	{
		return (float)((.5 * h) * (t+b));
	}
	
	public static float cTrapezoidSideLen(double t, double b, double h)
	{
		return (float)Math.sqrt(Math.pow((Math.abs(t-b)/2), 2) + Math.pow(h, 2));
	}
	
	public static float distToEquator(double d, double r)
	{
		return (float)(r * Math.sin(Math.toRadians(d)));
		
	}
}
